1. Field of the Invention
The present invention relates to image coding, and more particularly, to a prediction image generating apparatus using a plurality of masks, and to an apparatus for coding, transmitting and decoding a binary image using the same.
2. Description of the Related Art
Documents these days include characters or tables as well as text. Also, as color displays become more developed, various color photographs or pictures are used in computing. Since printers recognize only binary images, photographs or pictures to be printed are transformed into binary images using various methods for generating binary images, such as dithering or error diffusion.
Meanwhile, in a facsimile machine, the binary image of a scanned document is formed using the above-described methods for generating binary images, and the binary image is coded and transmitted. International Telecommunications Union-Telecommunication standarization (ITU-T) determines documents frequently transmitted by facsimile as a text document, and a coding method appropriate for the document. Also, various coding tables are determined by the document of a text. Thus, images obtained by binarizing the documents including pictures or photographs do not meet the requirements of the above coding methods.
That is, in facsimile machines, a document including photographs or pictures has a coding efficiency lower than a document containing only text. A conventional facsimile image coding standard uses a modified Huffman coding method. By the Huffman coding method, a series of black pixels indicated by 1 of a binary number in Table 1 or white pixels indicated by 0 thereof is mapped with a symbol of the coding table (Table 1) to compress the image.
For instance, assuming that a bit stream of a binary image before coding is as shown in FIG. 1A, a process of coding the binary image with reference to the Huffman table of Table 1 is as follows. First, a series of white pixels (000000) is mapped with 0001. Second, a series of black pixels (1111) is mapped with 010. Third, a series of white pixels (000) is mapped with 001. The binary images of FIG. 1A coded with reference to Table 1 become binary images shown in FIG. 1B.
TABLE 1 Black pixels Symbol White pixels Symbol 1 1 1 1 2 01 2 01 3 001 3 001 4 010 4 010 5 011 5 011 6 0001 6 0001
Referring to FIG. 1B, the coded binary image of FIG. 1A which has 24 pixels requires 17 bits, whereas the uncoded binary image requires 24 bits.
By the above Huffman coding method, as the series of white or black pixels of the binary image becomes longer, the coding becomes better. A text document has large spaces between lines and at the top, bottom and sides of the page, so that the series of white pixels is long, which satisfies the above conditions. However, the binary images of photographs or pictures do not have long series of pixels.
Thus, by the Huffman coding method, the coding efficiency for the binary images of pictures deteriorates. As a result, it takes longer to transmit text including pictures than to transmit text only.